package com.xpsoft.oa.dao.project.impl;


import java.util.List;

import org.hibernate.Query;

import com.xpsoft.core.dao.impl.BaseDaoImpl;
import com.xpsoft.oa.dao.project.ProjectFinalauditInfoDao;
import com.xpsoft.oa.model.project.ProjectFinalauditInfo;

public class ProjectFinalauditInfoDaoImpl extends BaseDaoImpl<ProjectFinalauditInfo> implements ProjectFinalauditInfoDao{

	public ProjectFinalauditInfoDaoImpl() {
		super(ProjectFinalauditInfo.class);
	}

	@Override
	public void deleteProjectFinalauditInfos(Long finalauditId,
			List<Long> idList) {
		// TODO Auto-generated method stub
		String hql = "delete from ProjectFinalauditInfo where id not in (:ids) and finalAudit.id=:finalauditId";
		Query query =  getSession().createQuery(hql);
		query.setParameterList("ids", idList).setParameter("finalauditId", finalauditId);
		query.executeUpdate();
	}

}